package com.android.model.goods;

import com.android.bean.BaseRecords;
import com.android.bean.GoodRecords;
import com.android.bean.GoodsType;
import com.android.bean.ResponseData;
import com.android.bean.queryBean.UserGoodsRecords;

import java.io.File;
import java.util.List;
import java.util.Map;

import io.reactivex.rxjava3.core.Observable;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;

public interface GoodsHttp_interface {
    @GET("tran/goods/type")
    @Headers({"appId:16ea3e8748a548628bacc7f143351473",
            "appSecret:5364653d0a53fe8ed4851b7729770ca1c7f6f"})
    Observable<ResponseData<List<GoodsType>>> sendGetAllGoodsType();

    @GET("tran/goods/all")
    @Headers({"appId:16ea3e8748a548628bacc7f143351473",
            "appSecret:5364653d0a53fe8ed4851b7729770ca1c7f6f"})
    Observable<ResponseData<GoodRecords>> sendGetAllGood(@Query("userId") Long userId,
                                                               @QueryMap Map<String, Object> map
                                                        );
    @GET("tran/trading/buy")
    @Headers({"appId:16ea3e8748a548628bacc7f143351473",
            "appSecret:5364653d0a53fe8ed4851b7729770ca1c7f6f"})
    Observable<ResponseData<BaseRecords<UserGoodsRecords>>> sendUserBuyGoods(@Query("userId") Long userId,
                                                           @QueryMap Map<String, Object> map);
    @GET("tran/trading/records")
    @Headers({"appId:16ea3e8748a548628bacc7f143351473",
            "appSecret:5364653d0a53fe8ed4851b7729770ca1c7f6f"})
    Observable<ResponseData<BaseRecords<UserGoodsRecords>>> sendUserRecords(@Query("userId") Long userId,
                                                                             @QueryMap Map<String, Object> map);

}
